$( document ).ready(function() {
	
	$("#currency").change(function(){
		
		var curr = $(this).attr('value');
		
		$.ajax({
			type: "POST",
			url: "https://esltraveler.com/currency.php",
			data: "curr=" + curr,
			success: function(msg){
				location.reload();
			},
			error: function(msg){
				//alert(curr);
				location.reload();
			}
		});
	
	});
	
	$("#currency-down").change(function(){
		
		var curr = $(this).attr('value');
		
		$.ajax({
			type: "POST",
			url: "https://esltraveler.com/currency.php",
			data: "curr=" + curr,
			success: function(msg){
				location.reload();
			},
			error: function(msg){
				//alert(curr);
				location.reload();
			}
		});
	
	});

});
